package pm.gui;

import pm.devices.drives.Drive;
import pm.oo.NativeOOViewComponent;

import java.math.BigDecimal;

/**
 * This interface determins responsibility of Gui Module
 * against of Core for executing gui operations and send
 * notifications of user input to GuiModuleListener registered
 * in constructor.
 * Created by fat3kb
 * Date: 03.02.2008
 * Time: 21:59:04
 */
public interface GuiModule {

	/** Shows full-screen splash */
	public void showSplashScreen();

	/**
	 * Shows Main Screen where user selects one of
	 * the operations available on PM:
	 * - print from file
	 * - make copy
	 * - scan to file
	 */
	public void showMainScreen();

	/**
	 * Shows Document View Screen which represents
	 * document opend in OpenOffice and
	 * controls to navigate on it and print it
	 *
	 * @param url text document url
	 */
	public void showPrintScreen();

	/**
	 * Shows File Choose Screen. On this screen user can:
	 * - select storage device where to search file -- CD, DVD,
	 * usb-storage device, card
	 * - specify a opening method -- text document, image, pdf
	 * - point file to open
	 */
	public void showFileChooseDialog();

	/**
	 * Shows Print Dialog. Where user can select what to print:
	 * current page, all pages, custom pages. Also user can
	 * specify number of copies and select custom printing
	 * (only for text documents) where it is possible to scale
	 * pages and print several pages on one sheet of paper.
	 *
	 * @param customPrintingAvailable specifies if to use a custom
	 *                                printing functionality
	 */
	public void showPrintDialog(boolean customPrintingAvailable);

	/**
	 * Shows Copy Screen where, depending on Copy Preview Option
	 * selected are buttons "scan" and "print" when Copy Preview
	 * Option is selected and just one button "copy" if Copy Preview
	 * not selected.
	 */
	public void showCopyScreen();

	/**
	 * Shows Scan Screen where user can scan and save
	 * scan result to file
	 */
	public void showScanScreen();

	/**
	 * Sets money quantity to display in MoneyPanel when
	 * this value is changed
	 *
	 * @param money quantity of moneys to show in Money Panel
	 */
	public void updateMoneyState(BigDecimal money);

	/**
	 * Sets current status of plugged devices to display
	 * at FileChoose Screen. Called when this status changes.
	 *
	 * @param drives array contains current plugged devices
	 */
	public void setDrives(Drive[] drives);

	/**
	 * Getter for special object which represents
	 * gui component accessible for OpenOffice to
	 * render all it's output to. This component
	 * uses native methods.
	 * @return swing component adjusted for OpenOffice use
	 */
	public NativeOOViewComponent getNativeOOViewComponent();
}
